package Demo1;

/**
 * @Author YuanYuan
 * @Date 2022/5/17
 * @Time 9:27
 */
abstract class Shape {
    protected int a;
    public static short b;

    public void draw1() {
        System.out.println("画图形！");
    }

    public abstract void draw();

}


class Pig extends Shape {
    @Override
    public void draw() {
        System.out.println("🐖");
    }
}
class Dog extends Shape {
    @Override
    public void draw() {
        System.out.println("🐕");
    }
}
public class Test1 {
    public static void drawShape(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Pig pig = new Pig();
        Dog dog = new Dog();
        drawShape(pig);
        drawShape(dog);

        //Shape shape = new Shape();
    }
}
